require 'rubygems'
require 'mechanize'
require 'date'
require 'net/smtp'

agent = WWW::Mechanize.new
agent.user_agent_alias = "Windows IE 6"
puts "[程序]: <#{Time.now()}> 正在登录校內..."
page = agent.get("http://www.xiaonei.com")
search_form = page.forms.first
username = "zjuliubin"
password = "mypass"
search_form.fields.name("email").value = username
search_form.fields.name("password").value = password
agent.submit(search_form)
page = agent.get("http://apps.xiaonei.com/friendsell/home.do")
id = "223304378"
agent.post("http://friendsell.xiaonei.com/friendsell/abuse.do", { :id => id , :paintype => "5" })

